<template>
    <component v-bind:is="type" :code="code" :image="image" :message="message[type]"></component>
</template>

<script>
import illustrated from '@/views/errors/illustrated.vue';
import minimal from '@/views/errors/minimal.vue';

export default {
    components: {
        illustrated,
        minimal,
    },
    data() {
        return {
            code: 404,
            image: '/svg/404.svg',
            message: {
                minimal: 'Not Found',
                illustrated: 'Sorry, the page you are looking for could not be found.',
            },
        };
    },
    computed: {
        type() {
            return this.$store.state.errorsType;
        },
    },
};
</script>
